Shells
<#5244#>
A contact whose parent is a root is called a <#2713#>top-level<#2713#> contact. A top-level contact is usually
a composite at the top of a hierarchy
of other contacts created by an application program. A CLUE application program
will
normally create at least one top-level contact which encapsulates user
interaction for the application. More complex applications will often use multiple
top-level contacts, each representing distinct user tasks. Top-level contacts
play a special role in a user interface, because only top-level windows are
subject to a user's operations for window management (performed via a window
manager client) and for session management (performed via a session manager
client). Window managers, session managers, and the conventions for
intercommunication among these clients are described in [#icccm##1###].
In addition, a top-level contact is often used as a <#2718#>pop-up<#2718#>
--- for example, a menu which ``pops up'' when a command button contact is
``pressed.'' A top-level pop-up ``belongs'' to another contact without being
constrained by it in position, size, or stacking order. A top-level contact
therefore has both a parent, which is always a root, and an <#2720#>owner<#2720#>, from which it may inherit resources
values and other properties.
In order to simplify top-level contact programming, CLUE defines a composite
subclass called <#2723#>shells<#2723#>. A shell is a top-level contact which
merely acts as an invisible ``container'' for exactly one child. From an
application programmer's point of view, the child of a shell is really the
effective top-level contact. Programmer changes to the size of the child are
automatically applied to the shell, and user changes to the size of a shell are
automatically applied to its child. The slots of a shell instance contain
values which form the window properties used to communicate with window managers
and session managers. See [#icccm##1###] for a complete discussion of the
conventions for client window properties.
Application programmers rarely need to operate on shells, other than to access
their property slots and change their state. In return, shells encapsulate the
responsibilities required of top-level windows and conveniently integrate
top-level pop-up's into the resource name hierarchy. All top-level contacts
should be shells; although this is not strictly required, the behavior of
non-shell top-level contacts is not guaranteed to be correct.
<#4705#>
<#4446#><#2728#>shell Class<#2728#><#4446#>
#tex2html_wrap_inline10292#
<#4705#>
Different CLUE shell subclasses are used to implement four basic types
of interaction with window managers and session managers:
- <#2738#>override-shell<#2738#>
- <#2739#>transient-shell<#2739#>
- <#2740#>top-level-shell<#2740#>
- <#2741#>top-level-session<#2741#>
<#5254#>by1<#5254#>
=0 <#5255#>=0 <#5259#>